﻿
<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
	<style type="text/css">
	body, html,#allmap {width: 100%;height: 100%;overflow: hidden;margin:0;font-family:"微软雅黑";}
	</style>
	<title>设置地图3D视角</title>
</head>
<body>
   
	<div id="allmap" style="border-radius:35px"></div>
    <!-- <button style="z-index: 99; position: absolute;top: 30px;" id="test">test</button> -->
    <script type="text/javascript" src="//api.map.baidu.com/api?type=webgl&v=1.0&ak=vQ7aSF2KGzKcOkXkKDYtavT6gQKmG7lH"></script>
    <script src="http://code.jquery.com/jquery-2.0.0.min.js"></script>
<script>
    var map = null;
    (function () {
        
        var that = this;
        map = new BMapGL.Map("allmap");
       
        function initControls() {
            map.centerAndZoom(new BMapGL.Point(108.55, 34.32), 6);  // 初始化地图,设置中心点坐标和地图级别
            map.enableScrollWheelZoom(true);   
            map.setMapType(BMAP_EARTH_MAP);  
           // map.setZoom(5.6);// 设置缩放比例
            map.addEventListener('tilesloaded', function () {
                var script = document.createElement('script');
                script.type = 'text/javascript';
                script.src = 'map.js';
                document.body.appendChild(script);
            });
        }
        
        
        initControls();
    })();
</script>
<!-- <script type="text/javascript" src="map.js"></script> -->
<!-- <script>
    datas.forEach(item => {
        var hole = new BMapGL.Polygon(item, {
            fillColor: '#F0F8FF',
            fillOpacity: 0.7
        });
        map.addOverlay(hole);
    });
</script> -->
</body>
</html>

